import { createApp } from 'vue'
import { createPinia } from 'pinia'
import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/antd.css'
import App from './App.vue'
import router from './router'

import './assets/main.css'

const app = createApp(App)

import TouIcons from '@/components/TouIcons/index.vue'

import init from '@/common/init'

app.use(createPinia()) //vuex5

app.component('icon', TouIcons)
app.use(Antd)
//  在这调用 菜单和生成动态路由
//pinia  菠萝

init().then((res) => {
  console.log('------------------------------------')

  //  我们是先初始化了路由  当时动态路由还未添加

  app.use(router)
  app.mount('#app')
})
